package se.webbzon.boltzmann.resource;

import java.awt.Font;
import java.awt.Image;
import java.util.Map;

import se.webbzon.oschi01.modelset.Model3D;
import se.webbzon.oschi01.resourceset.ResourceSet;
import se.webbzon.oschi01.sound.FiniteSoundSource;
import se.webbzon.oschi01.textureset.Texture3D;

public class Resources {
	
	// A map containing all loaded texture sets
	private static Map<String,ResourceSet<Texture3D>> textureSetMap;
	
	// A map containing all loaded image sets
	private static Map<String,ResourceSet<Image>> imageSetMap;
	
	// A map containing all loaded model sets
	private static Map<String,ResourceSet<Model3D>> modelSetMap;
	
	// A map containing all loaded sounds sources
	private static Map<String,FiniteSoundSource> soundMap;
	
	// A map containing all loaded font sources
	private static Map<String,Font> fontMap;
	
	/*============================================================
	Public Methods
	============================================================*/
	
	/** Returns the texture set associated with the given name. **/
	public static ResourceSet<Texture3D> getTextureSet(String name) {
		return textureSetMap.get(name);
	}
	
	/** Sets the static texture set map to the given texture set map. **/
	public static void setTextureSetMap(Map<String,ResourceSet<Texture3D>> map) {
		textureSetMap = map;
	}
	
	/** Returns the image set associated with the given name. **/
	public static ResourceSet<Image> getImageSet(String name) {
		return imageSetMap.get(name);
	}
	
	/** Sets the static image set map to the given image set map. **/
	public static void setImageSetMap(Map<String,ResourceSet<Image>> map) {
		imageSetMap = map;
	}
	
	/** Returns the model set associated with the given name. **/
	public static ResourceSet<Model3D> getModelSet(String name) {
		return modelSetMap.get(name);
	}
	
	/** Sets the static model set map to the given model set map. **/
	public static void setModelSetMap(Map<String,ResourceSet<Model3D>> map) {
		modelSetMap = map;
	}
	
	/** Returns the sound source associated with the given name. **/
	public static FiniteSoundSource getSound(String name) {
		return soundMap.get(name);
	}
	
	/** Sets the static sound source map to the given sound source map. **/
	public static void setSoundMap(Map<String,FiniteSoundSource> map) {
		soundMap = map;
	}
	
	/** Returns the font associated with the given name. **/
	public static Font getFont(String name) {
		return fontMap.get(name);
	}
	
	/** Sets the static font map to the given font map. **/
	public static void setFontMap(Map<String,Font> map) {
		fontMap = map;
	}
	

}
